#include <bits/stdc++.h>
using namespace std;
int a[300005];
bool cmp(int x, int y){
    return x > y;
}
int main(){
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++){
        cin >> a[i];
    }
    sort(a + 1, a + n + 1, cmp);
    double maxn = 0, man = 0;
    for (int i = 1;i <= n; i++){
        man += a[i];
        maxn = max(maxn, man * man / i);
    }
    printf("%.8f", maxn);
    return 0;
}